<div class="pdt10">
    <%= simple_form_for(@topic) do |f| %>
        <%= f.error_notification %>
        <%= f.input :title,
                    label: "标题",
                    required: false,
                    autofocus: true,
                    wrapper_html: {class: "form-group"},
                    input_html: { class: "form-control",
                                  id: "topic_title",
                                  placeholder: "主要内容" }%>

      <%= f.input :intro,
                  label: "简介",
                  as: :text,
                  wrapper_html: {class: "form-group"},
                  input_html: {class: "form-control",
                               id: "topic_intro",
                               placeholder: "选填, 简要描述",
                               rows: "8"} %>

      <%= f.association :tags,
                    label: "标签(1-5个)　",
                    required: false,
                    collection: Tag.all,
                    wrapper_html: {class: "form-group"},
                    input_html: { class: "chosen-select",
                                  id: "topic_tags"}%>

      <button type="submit" class="btn btn-default">提 交</button>
    <% end %>
</div>